import React, { Component } from 'react';
import {Link} from 'react-router-dom'
import routes from 'src/routes/index.js';
import './index.less';

export default class NavigationMenu extends Component {

  renderMenu = () => {
    let menuItems = [];
    routes.forEach((item, index) => {
      const component = (<li key={index}><Link to={item.path}>{item.path}</Link></li>);
      menuItems.push(component);
    });

    return menuItems;
  }

  render() {
    return (
      <ul>
        {this.renderMenu()}
      </ul>
    );
  }
}
